if (gPlayerBets[i].pBet[#denomination] = loseMe.pRank) or (gPlayerBets[i].pBet[#denomination] = winMe.pRank) then
if gPlayerBets[i].pType = #single then
if loseMe.pRank <> winMe.pRank then
if ((gPlayerBets[i].pBet[#denomination] = loseMe.pRank) and (gPlayerBets[i].pBet[#outcome] = #lose)) or ((gPlayerBets[i].pBet[#denomination] = winMe.pRank) and (gPlayerBets[i].pBet[#outcome] = #win)) then
points = points + 100
playerCredits.text = string(points)
end if
else
if loseMe.pRank <> winMe.pRank then
if ((gPlayerBets[i].pBet[#denomination] = loseMe.pRank) and (gPlayerBets[i].pBet[#outcome] = #lose)) or ((gPlayerBets[i].pBet[#denomination] = winMe.pRank) and (gPlayerBets[i].pBet[#outcome] = #win)) then
if gPlayerBets[i].pBet[#denomination] = #high then
if ((getValue(winMe.pRank) >= 7) and (gPlayerBets[i].pBet[#outcome] = #win)) or ((getValue(winMe.pRank) < 7) and (gPlayerBets[i].pBet[#outcome] = #lose)) then
points = points + 50
playerCredits.text = string(points)
updateStage()
else
points = points - 50
playerCredits.text = string(points)
updateStage()
end if
next repeat
end if
if gPlayerBets[i].pBet[#denomination] = #odd then
if (((getValue(winMe.pRank) mod 2) <> 0) and (gPlayerBets[i].pBet[#outcome] = #win)) or (((getValue(winMe.pRank) mod 2) = 0) and (gPlayerBets[i].pBet[#outcome] = #lose)) then
points = points + 50
playerCredits.text = string(points)
updateStage()
else
points = points - 50
playerCredits.text = string(points)
updateStage()
end if
updateStage()
end if
end if
end repeat
if points <= -100 then
go("game over")
end if
winMe = VOID
loseMe = VOID
if deck.mCountCards() = 1 then
repeat with i in ["ace", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten", "jack", "queen", "king"]